package com.hzw.saas.common.util.exception;

import org.springframework.http.HttpStatus;

/**
 * 正常状态的数据(文件等)丢失异常
 * HTTP STATUS 503
 *
 * @author zzl
 * @since 09/09/2021
 */
@SuppressWarnings("unchecked")
public class LostException extends BaseRuntimeException {

    private static final long serialVersionUID = 1L;

    @Override
    public Integer httpStatus() {
        return HttpStatus.SERVICE_UNAVAILABLE.value();
    }

    @Override
    public LostException setPrintTrack(boolean printTrack) {
        super.printTrack = printTrack;
        return this;
    }

    @Override
    public LostException setPrintMsg(boolean printMsg) {
        super.printMsg = printMsg;
        return this;
    }

    @Override
    public LostException setBizCode(String bizCode) {
        super.bizCode = bizCode;
        return this;
    }

    @Override
    public LostException setBizMsg(String bizMsg) {
        super.bizMsg = bizMsg;
        return this;
    }

    @Override
    protected void postConstruct() {

    }

    public LostException(String msg) {
        super(msg);
    }

    public LostException(String msg, Throwable cause) {
        super(msg, cause);
    }
}
